Optimal. Leaf size=279 \[ \frac {5 a^8 x}{512}-\frac {i a^{17}}{36 d (a-i a \tan (c+d x))^9}-\frac {i a^{16}}{32 d (a-i a \tan (c+d x))^8}-\frac {3 i a^{15}}{112 d (a-i a \tan (c+d x))^7}-\frac {i a^{14}}{48 d (a-i a \tan (c+d x))^6}-\frac {i a^{13}}{64 d (a-i a \tan (c+d x))^5}-\frac {3 i a^{12}}{256 d (a-i a \tan (c+d x))^4}-\frac {7 i a^{11}}{768 d (a-i a \tan (c+d x))^3}-\frac {i a^{10}}{128 d (a-i a \tan (c+d x))^2}-\frac {9 i a^9}{1024 d (a-i a \tan (c+d x))}+\frac {i a^9}{1024 d (a+i a \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 279, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3568, 46, 212}
\begin {gather*} -\frac {i a^{17}}{36 d (a-i a \tan (c+d x))^9}-\frac {i a^{16}}{32 d (a-i a \tan (c+d x))^8}-\frac {3 i a^{15}}{112 d (a-i a \tan (c+d x))^7}-\frac {i a^{14}}{48 d (a-i a \tan (c+d x))^6}-\frac {i a^{13}}{64 d (a-i a \tan (c+d x))^5}-\frac {3 i a^{12}}{256 d (a-i a \tan (c+d x))^4}-\frac {7 i a^{11}}{768 d (a-i a \tan (c+d x))^3}-\frac {i a^{10}}{128 d (a-i a \tan (c+d x))^2}-\frac {9 i a^9}{1024 d (a-i a \tan (c+d x))}+\frac {i a^9}{1024 d (a+i a \tan (c+d x))}+\frac {5 a^8 x}{512} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 212
Rule 3568
Rubi steps
\begin {align*} \int \cos ^{18}(c+d x) (a+i a \tan (c+d x))^8 \, dx &=-\frac {\left (i a^{19}\right ) \text {Subst}\left (\int \frac {1}{(a-x)^{10} (a+x)^2} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^{19}\right ) \text {Subst}\left (\int \left (\frac {1}{4 a^2 (a-x)^{10}}+\frac {1}{4 a^3 (a-x)^9}+\frac {3}{16 a^4 (a-x)^8}+\frac {1}{8 a^5 (a-x)^7}+\frac {5}{64 a^6 (a-x)^6}+\frac {3}{64 a^7 (a-x)^5}+\frac {7}{256 a^8 (a-x)^4}+\frac {1}{64 a^9 (a-x)^3}+\frac {9}{1024 a^{10} (a-x)^2}+\frac {1}{1024 a^{10} (a+x)^2}+\frac {5}{512 a^{10} \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^{17}}{36 d (a-i a \tan (c+d x))^9}-\frac {i a^{16}}{32 d (a-i a \tan (c+d x))^8}-\frac {3 i a^{15}}{112 d (a-i a \tan (c+d x))^7}-\frac {i a^{14}}{48 d (a-i a \tan (c+d x))^6}-\frac {i a^{13}}{64 d (a-i a \tan (c+d x))^5}-\frac {3 i a^{12}}{256 d (a-i a \tan (c+d x))^4}-\frac {7 i a^{11}}{768 d (a-i a \tan (c+d x))^3}-\frac {i a^{10}}{128 d (a-i a \tan (c+d x))^2}-\frac {9 i a^9}{1024 d (a-i a \tan (c+d x))}+\frac {i a^9}{1024 d (a+i a \tan (c+d x))}-\frac {\left (5 i a^9\right ) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{512 d}\\ &=\frac {5 a^8 x}{512}-\frac {i a^{17}}{36 d (a-i a \tan (c+d x))^9}-\frac {i a^{16}}{32 d (a-i a \tan (c+d x))^8}-\frac {3 i a^{15}}{112 d (a-i a \tan (c+d x))^7}-\frac {i a^{14}}{48 d (a-i a \tan (c+d x))^6}-\frac {i a^{13}}{64 d (a-i a \tan (c+d x))^5}-\frac {3 i a^{12}}{256 d (a-i a \tan (c+d x))^4}-\frac {7 i a^{11}}{768 d (a-i a \tan (c+d x))^3}-\frac {i a^{10}}{128 d (a-i a \tan (c+d x))^2}-\frac {9 i a^9}{1024 d (a-i a \tan (c+d x))}+\frac {i a^9}{1024 d (a+i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.98, size = 188, normalized size = 0.67 \begin {gather*} \frac {a^8 (-15876 i-28224 i \cos (2 (c+d x))-20160 i \cos (4 (c+d x))-12960 i \cos (6 (c+d x))-315 i \cos (8 (c+d x))+5040 d x \cos (8 (c+d x))+224 i \cos (10 (c+d x))-7056 \sin (2 (c+d x))-10080 \sin (4 (c+d x))-9720 \sin (6 (c+d x))+315 \sin (8 (c+d x))-5040 i d x \sin (8 (c+d x))+280 \sin (10 (c+d x))) (\cos (8 (c+2 d x))+i \sin (8 (c+2 d x)))}{516096 d (\cos (d x)+i \sin (d x))^8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 788 vs. \(2 (237 ) = 474\).
time = 0.32, size = 789, normalized size = 2.83
method | result | size |
risch | \(\frac {5 a^{8} x}{512}-\frac {i a^{8} {\mathrm e}^{18 i \left (d x +c \right )}}{18432 d}-\frac {5 i a^{8} {\mathrm e}^{16 i \left (d x +c \right )}}{8192 d}-\frac {45 i a^{8} {\mathrm e}^{14 i \left (d x +c \right )}}{14336 d}-\frac {5 i a^{8} {\mathrm e}^{12 i \left (d x +c \right )}}{512 d}-\frac {21 i a^{8} {\mathrm e}^{10 i \left (d x +c \right )}}{1024 d}-\frac {63 i a^{8} {\mathrm e}^{8 i \left (d x +c \right )}}{2048 d}-\frac {35 i a^{8} {\mathrm e}^{6 i \left (d x +c \right )}}{1024 d}-\frac {15 i a^{8} {\mathrm e}^{4 i \left (d x +c \right )}}{512 d}-\frac {11 i a^{8} \cos \left (2 d x +2 c \right )}{512 d}+\frac {23 a^{8} \sin \left (2 d x +2 c \right )}{1024 d}\) | \(187\) |
derivativedivides | \(\text {Expression too large to display}\) | \(789\) |
default | \(\text {Expression too large to display}\) | \(789\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 269, normalized size = 0.96 \begin {gather*} \frac {315 \, {\left (d x + c\right )} a^{8} + \frac {315 \, a^{8} \tan \left (d x + c\right )^{17} + 2730 \, a^{8} \tan \left (d x + c\right )^{15} + 10458 \, a^{8} \tan \left (d x + c\right )^{13} + 23202 \, a^{8} \tan \left (d x + c\right )^{11} + 32768 \, a^{8} \tan \left (d x + c\right )^{9} + 27486 \, a^{8} \tan \left (d x + c\right )^{7} + 21504 i \, a^{8} \tan \left (d x + c\right )^{6} + 86310 \, a^{8} \tan \left (d x + c\right )^{5} - 119808 i \, a^{8} \tan \left (d x + c\right )^{4} - 121002 \, a^{8} \tan \left (d x + c\right )^{3} + 82944 i \, a^{8} \tan \left (d x + c\right )^{2} + 31941 \, a^{8} \tan \left (d x + c\right ) - 5120 i \, a^{8}}{\tan \left (d x + c\right )^{18} + 9 \, \tan \left (d x + c\right )^{16} + 36 \, \tan \left (d x + c\right )^{14} + 84 \, \tan \left (d x + c\right )^{12} + 126 \, \tan \left (d x + c\right )^{10} + 126 \, \tan \left (d x + c\right )^{8} + 84 \, \tan \left (d x + c\right )^{6} + 36 \, \tan \left (d x + c\right )^{4} + 9 \, \tan \left (d x + c\right )^{2} + 1}}{32256 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.47, size = 162, normalized size = 0.58 \begin {gather*} \frac {{\left (5040 \, a^{8} d x e^{\left (2 i \, d x + 2 i \, c\right )} - 28 i \, a^{8} e^{\left (20 i \, d x + 20 i \, c\right )} - 315 i \, a^{8} e^{\left (18 i \, d x + 18 i \, c\right )} - 1620 i \, a^{8} e^{\left (16 i \, d x + 16 i \, c\right )} - 5040 i \, a^{8} e^{\left (14 i \, d x + 14 i \, c\right )} - 10584 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} - 15876 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} - 17640 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} - 15120 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} - 11340 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 252 i \, a^{8}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{516096 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.05, size = 413, normalized size = 1.48 \begin {gather*} \frac {5 a^{8} x}{512} + \begin {cases} \frac {\left (- 277298568799925181577403826176 i a^{8} d^{9} e^{20 i c} e^{18 i d x} - 3119608898999158292745793044480 i a^{8} d^{9} e^{18 i c} e^{16 i d x} - 16043702909138528362692649943040 i a^{8} d^{9} e^{16 i c} e^{14 i d x} - 49913742383986532683932688711680 i a^{8} d^{9} e^{14 i c} e^{12 i d x} - 104818859006371718636258646294528 i a^{8} d^{9} e^{12 i c} e^{10 i d x} - 157228288509557577954387969441792 i a^{8} d^{9} e^{10 i c} e^{8 i d x} - 174698098343952864393764410490880 i a^{8} d^{9} e^{8 i c} e^{6 i d x} - 149741227151959598051798066135040 i a^{8} d^{9} e^{6 i c} e^{4 i d x} - 112305920363969698538848549601280 i a^{8} d^{9} e^{4 i c} e^{2 i d x} + 2495687119199326634196634435584 i a^{8} d^{9} e^{- 2 i d x}\right ) e^{- 2 i c}}{5111167220120220946834707324076032 d^{10}} & \text {for}\: d^{10} e^{2 i c} \neq 0 \\x \left (- \frac {5 a^{8}}{512} + \frac {\left (a^{8} e^{20 i c} + 10 a^{8} e^{18 i c} + 45 a^{8} e^{16 i c} + 120 a^{8} e^{14 i c} + 210 a^{8} e^{12 i c} + 252 a^{8} e^{10 i c} + 210 a^{8} e^{8 i c} + 120 a^{8} e^{6 i c} + 45 a^{8} e^{4 i c} + 10 a^{8} e^{2 i c} + a^{8}\right ) e^{- 2 i c}}{1024}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1514 vs. \(2 (217) = 434\).
time = 1.52, size = 1514, normalized size = 5.43 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.23, size = 231, normalized size = 0.83 \begin {gather*} \frac {5\,a^8\,x}{512}+\frac {\frac {5\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^9}{512}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^8\,5{}\mathrm {i}}{64}-\frac {205\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^7}{768}-\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^6\,95{}\mathrm {i}}{192}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^5}{2}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^4\,11{}\mathrm {i}}{64}+\frac {393\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^3}{1792}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^2\,163{}\mathrm {i}}{448}-\frac {9019\,a^8\,\mathrm {tan}\left (c+d\,x\right )}{32256}-\frac {a^8\,10{}\mathrm {i}}{63}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^{10}+{\mathrm {tan}\left (c+d\,x\right )}^9\,8{}\mathrm {i}-27\,{\mathrm {tan}\left (c+d\,x\right )}^8-{\mathrm {tan}\left (c+d\,x\right )}^7\,48{}\mathrm {i}+42\,{\mathrm {tan}\left (c+d\,x\right )}^6+42\,{\mathrm {tan}\left (c+d\,x\right )}^4+{\mathrm {tan}\left (c+d\,x\right )}^3\,48{}\mathrm {i}-27\,{\mathrm {tan}\left (c+d\,x\right )}^2-\mathrm {tan}\left (c+d\,x\right )\,8{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________